package sgd.tp2.api.cmdline;

import com.beust.jcommander.IStringConverter;

public class NetProtocolPortConverter implements IStringConverter<Integer> {

	@Override
	public Integer convert(String value) {
		int port = Integer.parseInt(value);
		return (port < 0 || port > 65535 ? 1234 : port);
	}
}